"""Definition of the AdminFolder content type
"""

from zope.interface import implements

from Products.Archetypes import atapi
from Products.ATContentTypes.content import folder
from Products.ATContentTypes.content import schemata

# -*- Message Factory Imported Here -*-

from cintra.types.interfaces import IAdministrativoFolder
from cintra.types.config import PROJECTNAME

AdministrativoFolderSchema = folder.ATFolderSchema.copy() + atapi.Schema((

    # -*- Your Archetypes field definitions here ... -*-

))

# Set storage on fields copied from ATFolderSchema, making sure
# they work well with the python bridge properties.

AdministrativoFolderSchema['title'].storage = atapi.AnnotationStorage()
AdministrativoFolderSchema['description'].storage = atapi.AnnotationStorage()

schemata.finalizeATCTSchema(
    AdministrativoFolderSchema,
    folderish=True,
    moveDiscussion=False
)


class AdministrativoFolder(folder.ATFolder):
    """Administrativo' folder"""
    implements(IAdministrativoFolder)

    meta_type = "AdministrativoFolder"
    schema = AdministrativoFolderSchema

    title = atapi.ATFieldProperty('title')
    description = atapi.ATFieldProperty('description')

    # -*- Your ATSchema to Python Property Bridges Here ... -*-

atapi.registerType(AdministrativoFolder, PROJECTNAME)
